<?php echo $this->render('user/head.phtml');?>
	<style>
	#feedback { font-size: 1.4em; }
	#selectable .ui-selecting { background: #FECA40; }
	#selectable .ui-selected { background: #F39814; color: white; }
	#selectable { list-style-type: none; margin: 0; padding: 0; //width: 60%; }
	#selectable li { //margin: 3px; //padding: 0.4em; //font-size: 1em; //width: 60px;//text-align: center;//height: 18px;//float: left; //border: 1px solid gray;}
	</style>
	<script>
	$(function() {
		$( "#selectable" ).selectable();
	});
	</script>

<!-- <h3>上传课程</h3> -->
<!-- 上传课程 -->
<form enctype='multipart/form-data' action='/user/update-course' method='post'>
  <input type="hidden" name="act" value='save'/>
  <input type="hidden" name="id" value='<?php echo $this->course["id"];?>'/>
  <input type="hidden" name="format" value='<?php echo $this->course["format"];?>'/>
  <input type="hidden" name="size" value='<?php echo $this->course["size"];?>'/>
  <input type="hidden" name="uid" value='<?php echo $this->course["uid"];?>'/>
  <input type="hidden" name="thumb" value='<?php echo $this->course["thumb"];?>'/>
  <input type="hidden" name="path" value='<?php echo $this->course["path"];?>' />
  <table id='table_upload' class="user_table left">
    <tr class='odd'>
      <td>预览图：</td>
    <!-- </tr> -->
    <!-- <tr> -->
      <td >&nbsp;&nbsp;
        <image class='course_img' src="<?php echo THUMBNAILS_PREFIX.$this->course['thumb'];?>"/>
      </td>
    </tr>
    <tr class='odd'>
      <td>标题：</td>
    <!-- </tr> -->
    <!-- <tr> -->
      <td><input id='upload_input_title' type='test' name='title' value='<?php echo $this->course["title"]?>' /></td>
    </tr>
    <tr class='odd'>
      <td class='odd'>描述：</td>
    <!-- </tr> -->
    <!-- <tr> -->
      <td><textarea id='upload_input_desc' name='descript' ><?php echo $this->course['descript']?></textarea></td>
    </tr>
    <tr class='odd'>
      <td>分类：</td>
      <td rolspan="3">
	<?php $i=0;foreach ($this->path as $category){ ?>
	<div class="left">
	  <select class="category" name="cat_id_<?php echo $i;?>" id="category_<?php echo $i;?>" index="<?php echo $i++;?>">
	    <?php print make_options($category['categories'], $category['select']->get('id'));?>
	  </select>
	</div>
	<?php } for(;$i<5; ){ ?>
	      <div class="left">
		<select class="category" name="cat_id_<?php echo $i;?>" id="category_<?php echo $i;?>" index="<?php echo $i++;?>" style="display: none;">
		</select>
	      </div>
	<?php } ?>
      </td>
    </tr>
    <tr class='odd'>
      <td>
	关键字：
      </td>
    <!-- </tr> -->
    <!-- <tr> -->
      <td id='td_cat_tags'>
	<input type='text' name='tag1' class='input_tag' size='10' value="<?php if (isset($this->tags[0]['tag']))echo $this->tags[0]['tag'];?>"/>
	<input type='text' name='tag2' class='input_tag' size='10' value="<?php if (isset($this->tags[1]['tag']))echo $this->tags[1]['tag'];?>"/>
	<input type='text' name='tag3' class='input_tag' size='10' value="<?php if (isset($this->tags[2]['tag']))echo $this->tags[2]['tag'];?>"/>
      </td>
    </tr>
    <tr class='odd'>
      <td>
	价格：
      </td>
    <!-- </tr> -->
    <!-- <tr> -->
      <td>
	<input type='text' name='ori_price' value="<?php echo $this->course['ori_price']?>"/>
      </td>
      <td>
	重复收看不另外计费。
      </td>
    </tr>
    <tr class='odd'>
      <td>
	促销：
      </td>
    <!-- </tr> -->
    <!-- <tr> -->
      <td>
	<input type='checkbox' name='promotion' <?php echo $this->course['promotion'] ? "checked" : "";?>/>
      </td>
    </tr>
    
    <tr class='odd'>
      <td>
	促销价格：
      </td>
    <!-- </tr> -->
    <!-- <tr> -->
      <td>
	<input type='text' name='dis_price' value="<?php echo $this->course['dis_price']?>"/>
      </td>
    </tr>
    <tr>
      <td>
      </td>
    </tr>
    <tr>
      <td>
	<br/>
	<input type='submit' id='submit_upload_file' value="保存"/>
      </td>
    </tr>

  </table>
</form>

<?php echo $this->render('user/foot.phtml');?>
